package com.fjl.boot;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;

// 9. Aware 接口示例
@Component
class MyAwareBean implements ApplicationContextAware {
    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        System.out.println(">> ApplicationContextAware setApplicationContext: " + applicationContext.getApplicationName());
    }
}